<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>编辑线路详细信息</title>
<link type="text/css" href="/res/app/admin/css/common.css" rel="stylesheet" />
<script type="text/javascript" src="/res/js/lib/jquery.js"></script>
<script type="text/javascript" src="/res/js/lib/jquery.upload.js"></script>
<script type="text/javascript" src="/res/frame/js/t_thickbox.js"></script>
<script type="text/javascript" src="/res/frame/js/php.js"></script>
<script type="text/javascript" src="/res/lib/tiny_mce/tiny_mce.js"></script>

<script>
                        tinyMCE.init({
                            mode : "specific_textareas",
                            elements : "basic_description,extra",
                            theme : "advanced",
                            theme_advanced_buttons1 : "bold,underline,forecolor,justifyleft,justifycenter,justifyright,charmap,link,unlink,image,pastetext,removeformat,code",
                            theme_advanced_buttons2 : "tablecontrols",
                            theme_advanced_buttons3 : "",
                            theme_advanced_toolbar_location : "top",
                            theme_advanced_toolbar_align : "left",
                            theme_advanced_path_location : "bottom",
                            theme_advanced_resizing : true,
                            theme_advanced_resize_horizontal : false,
                            file_browser_callback : "TinyMCE_simplebrowser_browse",
                            plugin_simplebrowser_browseimageurl : '{routeimageurl}',
                            extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
                            plugins: 'paste,table,flash,simplebrowser',
                            language: 'zh_cn_utf8',
                            relative_urls : false,
                            remove_script_host : false
                        });
                    </script>


</head>
<body>
<form action="{url}" method="post">
    <center>
        <table summary="Form table" border="1"  cellpadding="2"  width="100%"cellspacing="1">
            <tr>
            <td  style="border-style: none;"><font color="#ffffff"><b>线路详细信息</b></font></td>
            </tr>
            <tr>
            <td style="border-style: none;">
            <fieldset>
                <legend ><b>线路名</b></legend>
                <center>
                    <input type="text" style="width: 470px;" disabled="disabled" name="route_name" id="route_name" disabled="disabled" value="{route.name}"/>
                </center>
           </fieldset>
        </td>
        </tr>
        
        
        <tr>
            <td style="border-style: none;">
            <fieldset>
                <legend ><strong>是否出境</strong></legend>
                <center>
                        <select id="is_abroad">
                            <option value='0'>国内线路</option>
                            <option value='1'>出境线路</option>
                        </select>
                </center>
           </fieldset>
        </td>
        </tr>
        
        
        
        <tr>
            <td style="border-style: none;">
            <fieldset>
                <legend ><strong>自费项目</strong></legend>
                <center>
                <div  id="self_fee_tr">
                                                        <textarea rows="15" style="width: 470px;" id="self_fee" name="self_fee" mce_editable="true">
                                                                {route.self_fee}
                                                        </textarea>
                                </div>
                </center>
           </fieldset>
        </td>
        </tr>
        
        
        
        <tr>
            <td style="border-style: none;">
            <fieldset>
                <legend ><strong>线路简介</strong></legend>
                <center>
                    <div  id="schedule_tr">
                            <textarea rows="15" style="width: 470px;" id="schedule" name="schedule" mce_editable="true">
                                {route.schedule}
                            </textarea>
                    </div>
                </center>
           </fieldset>
            </td>
        </tr>
        <tr>
            <td style="border-style: none;">
            <fieldset>
                <legend ><strong>温馨提示</strong></legend>
                <center>
                    <div  id="notice_tr">
                            <textarea rows="15" style="width: 470px;" id="notice" name="notice" mce_editable="true">
                                {route.notice}
                            </textarea>
                    </div>
                </center>
           </fieldset>
            </td>
        </tr>
        
        
        <tr>
            <td style="border-style: none;">
            <fieldset>
                <legend ></legend>
                <center>
                <input type="button" value="修 改" onclick="submit_form();" />
                </center>
           </fieldset>
        </td>
        </tr>
    </table>
  </center>
</form>
<script>
                        $("#is_abroad").attr("value",'{route.is_abroad}');
                        /*提交表单*/
                        function submit_form()
                        {
                            var data = new Array();
                            data['form[id]'] = {route.id};
                            data['form[is_abroad]']=$("#is_abroad").val();
                            data['form[self_fee]'] = tinyMCE.getContent('self_fee');
                            data['form[schedule]'] = tinyMCE.getContent('schedule');
                            data['form[notice]'] = tinyMCE.getContent('notice');
                            data['cache'] = Math.random();
                            data_str = implode_url(data);
                            //alert(data_str);return;
                            $.ajax({
                                    url:'{url}',
                                    data:data_str,
                                    //dataType:'json',
                                    type:'post',
                                    success:function(json){
                                        if(json){
                                             alert('成功');
                                             window.location.reload();
                                            }else {
                                                 alert('失败');
                                                }
                                        
                                    }
                                });
                        }
                    
                    </script>
</body>
</html>